package cn.edu.xmu.javaee.productdemoaop.mapper.jpa;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository
public interface OnSaleRepository extends JpaRepository<OnSalePojpa, Long> {
    List<OnSalePojpa> findByProductIdEqualsAndBeginTimeLessThanEqualAndEndTimeGreaterThanEqual(Long productId, LocalDateTime beginTime,LocalDateTime endTime);

}
